home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC Gamer (Italian) 30
/
PC Gamer IT CD 30 1-2.iso
/
MOTS
/
GAMEDATA
/
RESOURCE
/
JKMRES.GOO
/
cog_00_securitycam.cog
< prev
next >
Wrap
Text File
|
1998-02-25
|
1KB
|
65 lines
# Jedi Knight Cog Script
#
# 00_SECURITYCAM.COG
#
# Security camera cog.
#
# [YB]
#
# (C) 1997 LucasArts Entertainment Co. All Rights Reserved
symbols
thing camera
int player local
int triggerNum=10001 local
int active=1 local
vector cameraPos local
message startup
message killed
message pulse
end
# ========================================================================================
code
startup:
player = GetLocalPlayerThing();
cameraPos = GetThingPos(camera);
SetPulse(1.0);
Return;
# ........................................................................................
killed:
SetPulse(0.0);
active = 0;
Return;
# ........................................................................................
pulse:
if(!active) Return;
if(FirstThingInView(camera, 60, 5.0, 0x400) != -1)
{
// Send a TRIGGER_SECURITY with its parameters (the camera who saw him)
if(VectorDist(cameraPos, GetThingPos(player)) < 2.0)
SendTrigger(-1, triggerNum, camera, 0, 0, 0);
}
Return;
end